<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>添加扩展的词</title>
<link type="text/css" rel="stylesheet" href="css/en-decode.css"/>
<link type="text/css" rel="stylesheet" href="css/screen.css">
</head>
<body>
	<div id="content">
		<div id="content_inner">
			<div id="left_box">
				<a href="#">
					<img alt="" src="images/logo.jpg">
				</a>
				<div id="left_menu">
					<ul>
						<li><a href="index.html">首页</a></li>
						<li ><a href="en-decode.html">编码解码</a></li>
						<li class="current">添加扩展词语</li>
						<li><a href="parseurl.html">分析网页中文</a></li>
					</ul>
				</div>
			</div>
			<div id="main_box">
				<div id="content-header">
						<h2>天之翼<span>|添加扩展词语</span></h2>
				</div>
				<div id="content-content">
					<p>添加扩展的词语，用于分词</p>
					<textarea  id="value"></textarea>
					<textarea  id="tvalue"></textarea>
				<div class="ty-button">
					<input type="button" value="添加" id="add" />
					<input type="button" value="分词" id="split" />
				</div>
				</div>
			</div>
		</div>
	</div>
	<div id="foot">
		有问题请发邮件到：whj86728@gmail.com
	</div>
	<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
	<script type="text/javascript" src="js/jquery.elastic.source.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$('textarea').elastic();
			$('textarea').trigger('update');
			$('#add').click(function() {
				$.get("text", {
					words : $('#value').val(),
					type: 'add'
				}, function(data) {
					if($.trim(data) == 1) {
						alert('添加成功');
					}
				});
				
			});
			$('#split').click(function() {
				$.get("text", {
					words : $('#value').val(),
					type: 'split'
				}, function(data) {
					$('#tvalue').val(data)
				});
				
			});
		});
	</script>
</body>

</html>